<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Require Vue Test</title>
    <link rel="stylesheet" href="app.css">
</head>
<body>
  <div id="app"></div>
  <script src="../dist/loader.min.js"></script>
  <script>
      require.onError=function(e){
          console.error(e)
      }

    require.config({
      baseURI:'./',
      paths:{
       // vue:'https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue',
        HeyUI:'heyui'
      }
    })
      // require(["./page.vue"],function(r){
      //     console.log(r)
      // })
      define("n",function(){
          return {
              load: function (name, req, load, config) {
                  console.log(name)
                  req([name],function(ret){
                      let r=requirejs.s.contexts._;
                      setTimeout(function(){
                          delete r.defined[name]
                          console.log(r.defined[name])
                      },50)
                      load(ret)


                  })
              },
              write: function (pluginName, moduleName, write) {
                  console.log("write")
              },
              onLayerEnd:function(write, data){
                  console.log("end")
              },
              writeFile: function (pluginName, name, parentRequire, write){
                  console.log("writefile")
              }
          }
      })
    require(['vue','HeyUI','app.vue'],function(vue,HeyUI,app){

       // console.log(vue.compile.toString())

        vue.use(HeyUI)
        //window.HeyUI=HeyUI
         new vue(app).$mount("#app")

    })
  </script>
</body>
</html>
